Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

Cluster-autoscaler: cloud provider interface implementation for AWS #1377

Merged
merged 2 commits into from
Aug 16, 2016
Merged

Cluster-autoscaler: cloud provider interface implementation for AWS #1377

merged 2 commits into from
Aug 16, 2016

Conversation

osxi
Copy link
Contributor

@osxi osxi commented Jul 15, 2016

Part of #1311


This change is Reviewable

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@wojtek-t
Copy link
Contributor

@osxi
Copy link
Contributor Author

osxi commented Jul 19, 2016

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@mwielgus
Copy link
Contributor

cc: @andrewsykim @pbitty @iterion

}

// MaxSize returns maximum size of the node group.
func (asg *Asg) MaxSize() int {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems we could just pull MaxSize and MinSize from the AutoScalingGroup when we initialize. It's kind of annoying that it must be specified twice, both here and in the ASG itself. I'm not sure if there would be a use case for that?

@mwielgus I think this was lifted pretty much verbatim from the GCE side. I assume (from my short search through the MIG docs) that MIGs don't allow you to specify a min/max?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense to me.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iterion No, migs allow you only to specify the target number of instances.

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm.

@andrewsykim
Copy link

I signed it!

@mwielgus mwielgus assigned mwielgus and unassigned mwielgus Jul 26, 2016
@mwielgus
Copy link
Contributor

@pbitty @iterion Are you ok with the implementation? Did you have a chance to test it?

@iterion
Copy link

iterion commented Jul 26, 2016

We haven't tested the most recent iteration, but there were only minor changes. We'll try to test it all again soon.

@andrewsykim
Copy link

andrewsykim commented Jul 26, 2016

Same thing on our side, hopefully this week we'll get a chance to test it. We're also looking into writing some e2e tests for the AWS implementation.

@osxi
Copy link
Contributor Author

osxi commented Jul 27, 2016

I just tested it out and it works good. Turned up cluster using kops and was able to scale the worker ASG up/down as expected.

@mwielgus
Copy link
Contributor

mwielgus commented Aug 4, 2016

@osxi could you please sign the CLA?

// assert.NoError(t, err)
// }

// TODO: IncreaseSize
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please implement.

@osxi
Copy link
Contributor Author

osxi commented Aug 4, 2016

@mwielgus I signed the CLA but then I added a commit from @andrewsykim, who also signed the CLA.

I'll implement the commented tests.

@andrewsykim
Copy link

Finally had some time today to test this out! Sorry it took so long, we had to upgrade to v1.3 to get it working. The implementation works as expected! The only issue I've run into was that the Node objects are not deleted after scale down and they're set to a NotReady state which leaves a bunch of resources dangling (especially daemonsets). I don't think this issue is within the scope of this PR, I'm assuming its the responsibility of the API server to delete the node object if the instance is terminating. But I can also see how this problem can become an issue for clusters that run the CA for extended periods of time, wondering if the CA should explicitly tell the API server to delete the node that its terminating as a temporary solution to this problem (again, probably outside the scope of this PR).

@davidopp
Copy link
Contributor

davidopp commented Aug 7, 2016

Node object should be automatically deleted by node controller once it is gone from the cloud provider:

https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/node/nodecontroller.go#L469

@osxi
Copy link
Contributor Author

osxi commented Aug 8, 2016

Re-tested after adding the AWS SDK autoscaler interface around the autoscaler service and still works.

I haven't experienced any dangling nodes. After chatting with @andrewsykim on Slack, it looks like that might be related to the use of EC2 Classic (where my testing took place on a VPC setup).

@mwielgus
Copy link
Contributor

mwielgus commented Aug 8, 2016

'golint' problems: 
/home/travis/gopath/src/k8s.io/contrib/cluster-autoscaler/cloudprovider/aws/aws_manager.go:45:6: exported type AutoScaling should have comment or be unexported

@osxi
Copy link
Contributor Author

osxi commented Aug 8, 2016

@mwielgus I will fix that

@osxi
Copy link
Contributor Author

osxi commented Aug 15, 2016

@mwielgus can you please manually approve the CLA?

@mwielgus
Copy link
Contributor

There is no approval for CLA. There must be something missing on your side. Please check if your git author settings are in line with your github profile.

@googlebot
Copy link

CLAs look good, thanks!

@mwielgus
Copy link
Contributor

The code looks ok. Please squash the commits to 1-2 commits (code / extra godeps) and we should be ready to merge.

@osxi
Copy link
Contributor Author

osxi commented Aug 16, 2016

@mwielgus done

@mwielgus
Copy link
Contributor

LGTM

@mwielgus mwielgus added the lgtm Indicates that a PR is ready to be merged. label Aug 16, 2016
@mwielgus
Copy link
Contributor

Thank you for your contribution! :)

@osxi
Copy link
Contributor Author

osxi commented Aug 16, 2016

You're very welcome!

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 0264897 into kubernetes-retired:master Aug 16, 2016
@pbitty
Copy link

pbitty commented Aug 16, 2016

Awesome. Nice work @osxi and @andrewsykim !

@mwielgus
Copy link
Contributor

Please remember to update Kubernetes kube_up.sh scripts for AWS as well :).

k8s-github-robot pushed a commit to kubernetes/kubernetes that referenced this pull request Aug 18, 2016
Automatic merge from submit-queue

Bump cluster autoscaler to 0.3.0-beta2

Contains belongs fix kubernetes-retired/contrib#1560 and AWS support kubernetes-retired/contrib#1377.
mwielgus pushed a commit to kubernetes/autoscaler that referenced this pull request Apr 18, 2017
…/topic/aws-provider

Automatic merge from submit-queue

Cluster-autoscaler: cloud provider interface implementation for AWS

Part of kubernetes-retired/contrib#1311

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/contrib/1377)
<!-- Reviewable:end -->
mwielgus pushed a commit to kubernetes/autoscaler that referenced this pull request Apr 18, 2017
…/topic/aws-provider

Automatic merge from submit-queue

Cluster-autoscaler: cloud provider interface implementation for AWS

Part of kubernetes-retired/contrib#1311

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/contrib/1377)
<!-- Reviewable:end -->
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/autoscaler lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants